package iit.projects.etaxi.model.service;

import java.util.List;

import iit.projects.etaxi.model.dao.DriverDao;
//import iit.projects.etaxi.model.dao.OperatorDao;
import iit.projects.etaxi.model.dto.DriverSCDO;
import iit.projects.etaxi.model.entity.Driver;


//import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Transactional(readOnly = true)
public class DriverServiceImpl implements DriverService {

	private DriverDao driverDao;
	//private OperatorDao operatorDao;
	
	
	@Override
	@Transactional( readOnly=false, propagation=Propagation.REQUIRES_NEW)
	public Driver updateDriver(Driver driver){
		return driverDao.updateDriver(driver);
	}
	
	
	@Override
	public List<Driver> findDrivers(DriverSCDO driverSCDO) {
	return driverDao.findDrivers(driverSCDO);
	}
	
	
	public void setDriverDao(DriverDao driverDao) {
		this.driverDao = driverDao;
	}

	/*public void setOperatorDao(OperatorDao operatorDao) {
		this.operatorDao = operatorDao;
	}*/

}
